import http from './http';

export default {
	/** --------------------------- 设备相关 ------------------------- */

	// 下载地址
	getDownloadUrl(param, callback) {
		http('/app_download_url', 'GET', param, callback)
	},

	// 更新推送
	getUpdate(param, callback) {
		http('/app_update_version', 'GET', param, callback)
	},

	// 获取API地址
	getApiUrl() {
		return 'https://qb.wxlcoin.com/api'
	},
	
	/** --------------------------- 登录相关 ------------------------- */

	// 登录
	setLogin(param, callback) {
		http('/login', 'POST', param, callback)
	},

	// 退出
	setLoginOut(param, callback) {
		http('/user/signout', 'POST', param, callback)
	},

	// 注册
	register(param, callback) {
		http('/register', 'POST', param, callback)
	},

	// 获取验证码
	getVerifyCode(param, callback) {
		http('/sms_send', 'POST', param, callback)
	},

	// 忘记密码
	forgetPass(param, callback) {
		http('/user/forget', 'POST', param, callback)
	},
	
	/** --------------------------- 矿场信息相关 ------------------------- */
	
	// 获取矿场总量
	getMineInfo(param,callback){
		http('/mine/index','GET',param,callback)
	},
	// 获取挖矿收益列表
	getMineProfit(param,callback){
		http('/mine/mine_profit','GET',param,callback)
	},
	// 获取矿主收益列表
	getMinersProfit(param,callback){
		http('/mine/miners_profit','GET',param,callback)
	},
	// 获取推荐收益列表
	getInviteProfit(param,callback){
		http('/mine/invite_profit_tj','GET',param,callback)
	},
	// 矿主升级列表
	getMineUpgradeList(param,callback){
		http('/mine/miners_up_rule','GET',param,callback)
	},
	// 矿主升级操作按钮
	setMineUpgrade(param,callback){
		http('/mine/miners_up','POST',param,callback)
	},
	
	/** --------------------------- 钱包信息相关 ------------------------- */
	
	// 获取钱包信息
	getWalletInfo(param, callback) {
		http('/user/wallet', 'GET', param, callback)
	},
	// 可挖矿列表
	getCanMining(param,callback){
		http('/mine/avaliable','GET',param,callback)
	},
	// 挖矿中列表
	getMining(param,callback){
		http('/mine/mining','GET',param,callback)
	},
	// 解仓中列表
	getUnlock(param,callback){
		http('/mine/unlock','GET',param,callback)
	},
	// 解仓记录
	getUnlockHistory(param,callback){
		http('/mine/unlock_over','GET',param,callback)
	},
	// 挖矿操作
	addMining(param,callback){
		http('/mine/add','POST',param,callback)
	},
	// 解仓操作
	outMining(param,callback){
		http('/mine/out','POST',param,callback)
	},
	// 解仓撤销
	outMiningRevoke(param,callback){
		http('/mine/out_revoke','POST',param,callback)
	},
	// 转入可提
	TransferWithdraw(param,callback){
		http('/mine/again_revoke','POST',param,callback)
	},
	// 复投
	addAgain(param,callback){
		http('/mine/again_add','POST',param,callback)
	},
	// 复投记录
	addAgainRecord(param,callback){
		http('/mine/again_list','GET',param,callback)
	},
	// 划转历史记录
	addAgainRevoke(param,callback){
		http('/mine/again_revoke_list','GET',param,callback)
	},
	// 划转
	setRevokeAgain(param,callback){
		http('/mine/again_revoke','POST',param,callback)
	},
	// 锁仓
	lockWarehourse(param, callback) {
		http('/user/lock_house', 'POST', param, callback)
	},
	// 锁仓记录
	LockWarehourseRecord(param, callback) {
		http('/user/lock_list', 'GET', param, callback)
	},
	// 撤销锁仓
	revokeLock(param, callback) {
		http('/user/turn_out_lock', 'POST', param, callback)
	},
	// 冻结资产
	frozenAssets(param, callback) {
		http('/user/djzc', 'GET', param, callback)
	},
	// 提币列表
	extractRecord(param, callback) {
		http('/user/get_out_list', 'GET', param, callback)
	},
	// 撤销提币
	revokeExtract(param, callback) {
		http('/user/get_out_revoke', 'POST', param, callback)
	},
	// 可提币及手续费比例
	getRates(param,callback){
		http('/user/get_out_rate','GET',param,callback)
	},
	
	// 提币操作
	onExtract(param, callback) {
		http('/user/get_out', 'POST', param, callback)
	},
	
	// 资金密码验证
	verifyFundsPass(param, callback) {
		http('/user/pay_pws_check', 'POST', param, callback)
	},

	// 空投规则页
	getRule(param, callback){
		http('/airdrop/rule', 'GET', param, callback)
	},
	// 空投历记录
	getOutList(param, callback){
		http('/airdrop/get_out_list', 'GET', param, callback)
	},
	//空投可转入限额获取
	getOutNorm(param, callback){
		http('/airdrop/get_out_norm', 'GET', param, callback)
	},
	// 空投转入可以接口
	getOut(param, callback){
		http('/airdrop/get_out', 'POSt', param, callback)
	},
	
	/** --------------------------- 用户信息相关 ------------------------- */

	// 获取用户信息
	getUserInfo(param, callback) {
		http('/user/info', 'GET', param, callback)
	},

	// 绑定ok账户
	bindOkAccount(param, callback) {
		http('/user/account_bind', 'POST', param, callback)
	},

	// 解绑ok账户
	removeOkAccount(param, callback) {
		http('/user/account_unbind', 'POST', param, callback)
	},

	// 实名认证
	bindRealName(param, callback) {
		http('/user/realname', 'POST', param, callback)
	},

	// 获取使用认证状态
	getRealNameStatus(param, callback){
		http('/user/realname_status', 'GET', param, callback)
	},

	// 获取联系方式
	getContactWay(param, callback) {
		http('/service_wechat_pic', 'GET', param, callback)
	},

	// 修改密码
	updatePass(param, callback) {
		http('/updatePassword', 'POST', param, callback)
	},
	
	// 设置资金密码
	setFundsPass(param, callback) {
		http('/user/pay_pws_set', 'POST', param, callback)
	},

	// 获取邀请码
	getInviteCode(param, callback) {
		http('/user/getInviteCode', 'GET', param, callback)
	},

	// 获取邀请好友列表
	getUserFriends(param, callback) {
		http('/user/friends', 'GET', param, callback)
	},

	// 修改用户资料
	changeUserInfo(param, callback) {
		http('/user/modify', 'POST', param, callback)
	},
	
	/** --------------------------- 获取新闻相关页面 ------------------------- */
	
	/**
	 * 获取公告: c_id:10
	 * 获取资讯: c_id:9
	 */
	getAnnouncementList(param, callback) {
		http('/news/list', 'POST', param, callback)
	},

	// 获取新闻详情
	getNewsDetail(param, callback) {
		http('/news/detail', 'GET', param, callback)
	},

}
